<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
//获取ArrayList数据
ArrayList al =(ArrayList) request.getAttribute("name");
out.print("用户有:<br>");
for(int i = 0; i<al.size(); i++){
out.print(al.get(i)+"<br>");
}
//获取HashMap数据
HashMap map =(HashMap) request.getAttribute("country");
out.print("国家代号与国家的对应关系:<br>");
//获取key上的迭代器
Set set = map.keySet();
Iterator it = set.iterator();
while(it.hasNext()){
String key = (String)it.next();
String value = (String)map.get(key);
out.print(key+"对应的国家--"+value+"<br>");
}
%>
</body>
</html>